package com.chenyaowei.member.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chenyaowei.member.mapper.CywMemberLevelMapper;
import com.chenyaowei.member.domain.CywMemberLevel;
import com.chenyaowei.member.service.ICywMemberLevelService;

/**
 * 会员等级Service业务层处理
 * 
 * @author chenyaowei
 * @date 2023-11-28
 */
@Service
public class CywMemberLevelServiceImpl implements ICywMemberLevelService 
{
    @Autowired
    private CywMemberLevelMapper cywMemberLevelMapper;

    /**
     * 查询会员等级
     * 
     * @param id 会员等级主键
     * @return 会员等级
     */
    @Override
    public CywMemberLevel selectCywMemberLevelById(Long id)
    {
        return cywMemberLevelMapper.selectCywMemberLevelById(id);
    }

    /**
     * 查询会员等级列表
     * 
     * @param cywMemberLevel 会员等级
     * @return 会员等级
     */
    @Override
    public List<CywMemberLevel> selectCywMemberLevelList(CywMemberLevel cywMemberLevel)
    {
        return cywMemberLevelMapper.selectCywMemberLevelList(cywMemberLevel);
    }

    /**
     * 新增会员等级
     * 
     * @param cywMemberLevel 会员等级
     * @return 结果
     */
    @Override
    public int insertCywMemberLevel(CywMemberLevel cywMemberLevel)
    {
        return cywMemberLevelMapper.insertCywMemberLevel(cywMemberLevel);
    }

    /**
     * 修改会员等级
     * 
     * @param cywMemberLevel 会员等级
     * @return 结果
     */
    @Override
    public int updateCywMemberLevel(CywMemberLevel cywMemberLevel)
    {
        return cywMemberLevelMapper.updateCywMemberLevel(cywMemberLevel);
    }

    /**
     * 批量删除会员等级
     * 
     * @param ids 需要删除的会员等级主键
     * @return 结果
     */
    @Override
    public int deleteCywMemberLevelByIds(Long[] ids)
    {
        return cywMemberLevelMapper.deleteCywMemberLevelByIds(ids);
    }

    /**
     * 删除会员等级信息
     * 
     * @param id 会员等级主键
     * @return 结果
     */
    @Override
    public int deleteCywMemberLevelById(Long id)
    {
        return cywMemberLevelMapper.deleteCywMemberLevelById(id);
    }
}
